import Vue from 'vue'
import Router from 'vue-router'
import Index from '@/pages/index'
import Home from '@/pages/home'
import Artists from '@/pages/artists'
import Listcate from '@/pages/listcate'
import Search from '@/pages/search'
import Ucenter from '@/pages/ucenter'
import artDatail from '@/pages/artDetail'
import Hot from '@/pages/muiscList/hot_list'
import News from '@/pages/muiscList/news_list'
import King from '@/pages/muiscList/king_list'
import MoreList from '@/pages/muiscList/moreList'
import musicPlay from '@/pages/musicPlay'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path:'/musicplay/:songId',
      name:'musicPlay',
      component:musicPlay
    },
    {
      path: '/',
      name: 'Index',
      redirect:'/home',
      component: Index,
      children:[
        {
          path:'home',
          component:Home,
          redirect:'/home/hot',
          children:[
            {
              path:'hot',
              component:Hot
            },
            {
              path:'news',
              component:News
            },
            {
              path:'king',
              component:King
            }
          ]
        },
        {
          path:'artists',
          component:Artists
        },
        {
          path:'artDatail/:ting_uid',
          name:'artDatail',
          component:artDatail
        },
        {
          path:'listcate',
          component:Listcate
        },
        {
          path:'search',
          component:Search
        },
        {
          path:'ucenter',
          component:Ucenter
        },
        {
          path:'moreList',
          name:'MoreList',
          component:MoreList
        },

      ]
    }
  ],
  linkActiveClass:'active'
})
